﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace WxYygh.Models
{
    public class UserInfo
    {
        public string access_token { get; set; }
        public string expires_in { get; set; }
        public string refresh_token { get; set; }
        public string openid { get; set; }
        public string scope { get; set; }
    }

    public class SignModel {
        public string Action { get; set; }
        public string SecretId { get; set; }
        public int Timestamp { get; set; }
        public int Nonce { get; set; }
        public string Region { get; set; }
    }

    public class UserModel
    {

        /// <summary>
        /// openid
        /// </summary>		
        private string _openid;
        public string openid
        {
            get { return _openid; }
            set { _openid = value; }
        }
        /// <summary>
        /// sfzh
        /// </summary>		
        private string _sfzh;
        public string sfzh
        {
            get { return _sfzh; }
            set { _sfzh = value; }
        }
        /// <summary>
        /// sjhm
        /// </summary>		
        private string _sjhm;
        public string sjhm
        {
            get { return _sjhm; }
            set { _sjhm = value; }
        }
        /// <summary>
        /// addtime
        /// </summary>		
        private DateTime _addtime;
        public DateTime addtime
        {
            get { return _addtime; }
            set { _addtime = value; }
        }
        /// <summary>
        /// zyhm
        /// </summary>		
        private string _zyhm;
        public string zyhm
        {
            get { return _zyhm; }
            set { _zyhm = value; }
        }

        /// <summary>
        /// zyhm
        /// </summary>		
        private string _brxm;
        public string brxm
        {
            get { return _brxm; }
            set { _brxm = value; }
        }

        private int _sex;
        public int sex
        {
            get { return _sex; }
            set { _sex = value; }
        }

        private int _isdefault;
        public int isdefault
        {
            get { return _isdefault; }
            set { _isdefault = value; }
        }


    }

    /// <summary>
    /// 公众号模板消息
    /// </summary>
    public class TemplateMessage
    {
        public TemplateMessage()
        {
            topcolor = "#FF0000";
        }
        /// <summary>
        /// 接收者微信OpenId
        /// </summary>
        public string touser { get; set; }
        /// <summary>
        /// 模板Id
        /// </summary>
        public string template_id { get; set; }
        /// <summary>
        /// 跳转url
        /// </summary>
        public string url { get; set; }
        /// <summary>
        /// 顶部颜色
        /// </summary>
        public string topcolor { get; set; }
        /// <summary>
        /// 具体模板数据
        /// </summary>
        public object data { get; set; }
    }

    public class TemplateDataItem
    {
        /// <summary>
        /// 项目值
        /// </summary>
        public string value { get; set; }
        /// <summary>
        /// 16进制颜色代码，如：#FF0000
        /// </summary>
        public string color { get; set; }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="v">value</param>
        /// <param name="c">color</param>
        public TemplateDataItem(string v, string c = "#173177")
        {
            value = v;
            color = c;
        }


    }
}